#! /bin/bash
OWNER="xiaods"
REPO="k8e"
KUBECONFIG="/etc/k8e/k8e.yaml"
REGISTRY="/etc/k8e/registries.yaml"
PAUSE_IMAGE="registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.6"
API_SERVER_IP="10.11.130.1"
VIP="10.11.130.10"
PORT="6443"
CIDRLIST="10.42.0.0/16"
K8E_TOKEN="ilovek8e"
LIST="kubectl helm"
TLS="star-lntu-tls"

K8E_URL="https://${API_SERVER_IP}:${PORT}"
AGENT_K8e_URL="https://${VIP}:${PORT}"
# 设置虚拟 IP 用于访问控制平面的地址

INTERFACE="ens7"
# 设置控制平面所在主机的网卡名称
#cilium_version="1.16.3"
export cilium_version=$(
  curl -sL \
    https://api.github.com/repos/cilium/cilium/releases/latest |
    jq -r '.tag_name | ltrimstr("v")'
)
# cilium_version=$(curl -sL https://api.github.com/repos/cilium/cilium/releases/ | jq -r ".[0].name")
KVVERSION=$(curl -sL https://api.github.com/repos/kube-vip/kube-vip/releases | jq -r ".[0].name") # 获取 kube-vip 版本

# INSTALL_K8E_EXEC="server --cluster-init --write-kubeconfig-mode=644 --tls-san ${VIP}" # --pause-image $PAUSE_IMAGE
INSTALL_K8E_EXEC="server --cluster-init --write-kubeconfig-mode=644 --tls-san ${VIP} --pause-image ${PAUSE_IMAGE}"
INSTALL_K8E_EXEC_OTHER="server --write-kubeconfig-mode=666 --tls-san ${VIP} --pause-image ${PAUSE_IMAGE}"
INSTALL_K8E_EXEC_AGENT="--tls-san ${VIP} --pause-image ${PAUSE_IMAGE}"
